import React from "react";
import Feedback from "./components/Feedback";
import OfflinePortal from "./components/OfflinePortal";

interface Props {
  data: {
    feedback: Record<string, any>;
    offlinePortal: Record<string, any>;
  };
}

const TodayOfflineStoreTraffic: React.FC<Props> = (props) => {
  return (
    <React.Fragment>
      {/* 反馈信息 */}
      <div className="flex justify-around items-center mb-[20px]">
        {props.data.feedback.map((item: Record<string, any>) => (
          <div className="flex flex-col items-center" key={item.id}>
            <Feedback data={item} />
            <span className="bg-[linear-gradient(to_bottom,#fff,#6176F4)] font-bold mt-[5px] text-[#b2cfee] text-[16px] bg-clip-text text-[transparent]">{item.title}</span>
          </div>
        ))}
      </div>
      {/* 离线门户 */}
      <OfflinePortal data={props.data.offlinePortal} />
    </React.Fragment>
  );
};

export default React.memo(TodayOfflineStoreTraffic);
